.class public Les/mk;
.super Landroid/widget/FrameLayout;
.source "AutoRefreshAdView.java"


# instance fields
.field private a:J

.field private b:I

.field private c:Z

.field private d:Landroid/view/ViewGroup;

.field private e:Landroid/view/ViewGroup;

.field f:Landroid/view/animation/Animation;

.field g:Landroid/view/animation/Animation;

.field private h:Landroid/os/Handler;

.field private i:Lcom/estrongs/android/pop/app/ad/cn/AdType;

.field private j:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Les/mk;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    const/4 v0, 0x0

    .line 2
    invoke-direct {p0, p1, p2, v0}, Les/mk;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Landroid/util/AttributeSet;
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 4
    new-instance p1, Landroid/os/Handler;

    new-instance p2, Les/mk$a;

    invoke-direct {p2, p0}, Les/mk$a;-><init>(Les/mk;)V

    invoke-direct {p1, p2}, Landroid/os/Handler;-><init>(Landroid/os/Handler$Callback;)V

    iput-object p1, p0, Les/mk;->h:Landroid/os/Handler;

    const/4 p1, 0x0

    .line 5
    iput-boolean p1, p0, Les/mk;->j:Z

    .line 6
    invoke-direct {p0}, Les/mk;->d()V

    return-void
.end method

.method static synthetic a(Les/mk;)I
    .locals 2

    .line 1
    iget v0, p0, Les/mk;->b:I

    add-int/lit8 v1, v0, -0x1

    iput v1, p0, Les/mk;->b:I

    return v0
.end method

.method static synthetic a(Les/mk;Landroid/view/ViewGroup;)Landroid/view/ViewGroup;
    .locals 0

    .line 2
    iput-object p1, p0, Les/mk;->d:Landroid/view/ViewGroup;

    return-object p1
.end method

.method private b()Landroid/view/ViewGroup;
    .locals 2

    .line 3
    new-instance v0, Les/nk;

    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Les/nk;-><init>(Landroid/content/Context;)V

    .line 4
    invoke-virtual {v0}, Landroid/widget/RelativeLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 5
    invoke-virtual {v0}, Landroid/widget/RelativeLayout;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    check-cast v1, Landroid/view/ViewGroup;

    invoke-virtual {v1, v0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    :cond_0
    const/4 v1, 0x0

    .line 6
    invoke-virtual {p0, v0, v1}, Les/mk;->addView(Landroid/view/View;I)V

    return-object v0
.end method

.method static synthetic b(Les/mk;Landroid/view/ViewGroup;)Landroid/view/ViewGroup;
    .locals 0

    .line 2
    iput-object p1, p0, Les/mk;->e:Landroid/view/ViewGroup;

    return-object p1
.end method

.method static synthetic b(Les/mk;)Lcom/estrongs/android/pop/app/ad/cn/AdType;
    .locals 0

    .line 1
    iget-object p0, p0, Les/mk;->i:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    return-object p0
.end method

.method private c()V
    .locals 4

    .line 2
    iget v0, p0, Les/mk;->b:I

    if-lez v0, :cond_0

    .line 3
    iget-object v0, p0, Les/mk;->h:Landroid/os/Handler;

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    .line 4
    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    .line 5
    iget-object v0, p0, Les/mk;->h:Landroid/os/Handler;

    const/4 v1, 0x0

    iget-wide v2, p0, Les/mk;->a:J

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    :cond_0
    return-void
.end method

.method static synthetic c(Les/mk;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Les/mk;->c:Z

    return p0
.end method

.method static synthetic d(Les/mk;)Landroid/view/ViewGroup;
    .locals 0

    .line 1
    iget-object p0, p0, Les/mk;->d:Landroid/view/ViewGroup;

    return-object p0
.end method

.method private d()V
    .locals 5

    .line 2
    iget-object v0, p0, Les/mk;->i:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    const-wide/16 v1, 0x0

    const/4 v3, 0x0

    if-nez v0, :cond_1

    .line 3
    iget v0, p0, Les/mk;->b:I

    if-nez v0, :cond_0

    .line 4
    iput-wide v1, p0, Les/mk;->a:J

    .line 5
    iput v3, p0, Les/mk;->b:I

    .line 6
    iput-boolean v3, p0, Les/mk;->c:Z

    :cond_0
    return-void

    .line 7
    :cond_1
    invoke-static {}, Les/ok;->g()Les/ok;

    move-result-object v0

    invoke-virtual {v0}, Les/gl;->b()Les/ll;

    move-result-object v0

    .line 8
    instance-of v4, v0, Les/ok$b;

    if-eqz v4, :cond_4

    iget-boolean v4, v0, Les/ll;->b:Z

    if-nez v4, :cond_2

    goto :goto_0

    .line 9
    :cond_2
    check-cast v0, Les/ok$b;

    .line 10
    iget-object v4, p0, Les/mk;->i:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    invoke-virtual {v0, v4}, Les/ok$b;->a(Lcom/estrongs/android/pop/app/ad/cn/AdType;)Les/ok$a;

    move-result-object v0

    if-eqz v0, :cond_3

    .line 11
    iget-wide v1, v0, Les/ok$a;->c:J

    iput-wide v1, p0, Les/mk;->a:J

    .line 12
    iget v1, v0, Les/ok$a;->b:I

    iput v1, p0, Les/mk;->b:I

    .line 13
    iget-boolean v0, v0, Les/ok$a;->a:Z

    iput-boolean v0, p0, Les/mk;->c:Z

    goto :goto_1

    .line 14
    :cond_3
    iput-wide v1, p0, Les/mk;->a:J

    .line 15
    iput v3, p0, Les/mk;->b:I

    .line 16
    iput-boolean v3, p0, Les/mk;->c:Z

    goto :goto_1

    .line 17
    :cond_4
    :goto_0
    iput-wide v1, p0, Les/mk;->a:J

    .line 18
    iput v3, p0, Les/mk;->b:I

    .line 19
    iput-boolean v3, p0, Les/mk;->c:Z

    :goto_1
    return-void
.end method

.method static synthetic e(Les/mk;)Landroid/view/ViewGroup;
    .locals 0

    .line 1
    iget-object p0, p0, Les/mk;->e:Landroid/view/ViewGroup;

    return-object p0
.end method

.method static synthetic f(Les/mk;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/mk;->c()V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 2

    const-wide/16 v0, 0x0

    .line 3
    iput-wide v0, p0, Les/mk;->a:J

    .line 4
    invoke-direct {p0}, Les/mk;->d()V

    .line 5
    iget-object v0, p0, Les/mk;->h:Landroid/os/Handler;

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    .line 6
    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    :cond_0
    return-void
.end method

.method public a(Landroid/view/animation/Animation;Landroid/view/animation/Animation;)V
    .locals 1

    .line 7
    new-instance v0, Les/mk$b;

    invoke-direct {v0, p0, p2, p1}, Les/mk$b;-><init>(Les/mk;Landroid/view/animation/Animation;Landroid/view/animation/Animation;)V

    invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->post(Ljava/lang/Runnable;)Z

    return-void
.end method

.method public addView(Landroid/view/View;I)V
    .locals 2

    .line 1
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getChildCount()I

    move-result v0

    const/4 v1, 0x1

    if-lt v0, v1, :cond_0

    const/4 v0, 0x0

    .line 2
    invoke-virtual {p1, v0}, Landroid/view/View;->setAlpha(F)V

    .line 3
    :goto_0
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getChildCount()I

    move-result v0

    const/4 v1, 0x2

    if-lt v0, v1, :cond_0

    const/4 v0, 0x0

    .line 4
    invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->removeViewAt(I)V

    goto :goto_0

    .line 5
    :cond_0
    invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;I)V

    return-void
.end method

.method public getAdView()Landroid/view/ViewGroup;
    .locals 3

    .line 1
    iget-boolean v0, p0, Les/mk;->c:Z

    const/4 v1, 0x0

    if-nez v0, :cond_1

    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getChildCount()I

    move-result v0

    const/4 v2, 0x1

    if-ne v0, v2, :cond_1

    .line 2
    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    instance-of v0, v0, Les/nk;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    return-object v0

    .line 4
    :cond_0
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->removeAllViews()V

    .line 5
    invoke-direct {p0}, Les/mk;->b()Landroid/view/ViewGroup;

    move-result-object v0

    return-object v0

    .line 6
    :cond_1
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getChildCount()I

    move-result v0

    const/4 v2, 0x2

    if-ne v0, v2, :cond_2

    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    instance-of v0, v0, Les/nk;

    if-eqz v0, :cond_2

    .line 7
    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    return-object v0

    .line 8
    :cond_2
    invoke-direct {p0}, Les/mk;->b()Landroid/view/ViewGroup;

    move-result-object v0

    return-object v0
.end method

.method public getVisibilePercent()I
    .locals 2

    .line 1
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    .line 2
    invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->getLocalVisibleRect(Landroid/graphics/Rect;)Z

    .line 3
    invoke-virtual {p0}, Landroid/widget/FrameLayout;->getHeight()I

    move-result v1

    .line 4
    invoke-virtual {v0}, Landroid/graphics/Rect;->height()I

    move-result v0

    mul-int/lit8 v0, v0, 0x64

    if-nez v1, :cond_0

    const/4 v1, 0x1

    .line 5
    :cond_0
    div-int/2addr v0, v1

    return v0
.end method

.method protected onAttachedToWindow()V
    .locals 2

    .line 1
    invoke-super {p0}, Landroid/widget/FrameLayout;->onAttachedToWindow()V

    .line 2
    iget-boolean v0, p0, Les/mk;->j:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Les/mk;->f:Landroid/view/animation/Animation;

    if-eqz v0, :cond_0

    iget-object v1, p0, Les/mk;->g:Landroid/view/animation/Animation;

    if-eqz v1, :cond_0

    .line 3
    invoke-virtual {p0, v0, v1}, Les/mk;->a(Landroid/view/animation/Animation;Landroid/view/animation/Animation;)V

    :cond_0
    const/4 v0, 0x0

    .line 4
    iput-boolean v0, p0, Les/mk;->j:Z

    return-void
.end method

.method protected onDetachedFromWindow()V
    .locals 2

    .line 1
    invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V

    .line 2
    iget-object v0, p0, Les/mk;->h:Landroid/os/Handler;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    const/4 v0, 0x1

    .line 3
    iput-boolean v0, p0, Les/mk;->j:Z

    return-void
.end method

.method protected onVisibilityChanged(Landroid/view/View;I)V
    .locals 2
    .param p1    # Landroid/view/View;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    invoke-virtual {p0}, Les/mk;->a()V

    if-eqz p2, :cond_0

    .line 2
    iget-object v0, p0, Les/mk;->h:Landroid/os/Handler;

    if-eqz v0, :cond_0

    const/4 v1, 0x0

    .line 3
    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V

    .line 4
    :cond_0
    invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->onVisibilityChanged(Landroid/view/View;I)V

    return-void
.end method

.method public setAdType(Lcom/estrongs/android/pop/app/ad/cn/AdType;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/mk;->i:Lcom/estrongs/android/pop/app/ad/cn/AdType;

    return-void
.end method
